package net.zjitc.Zifu;

import java.util.Scanner;

/**
 * @Author admin
 * @Date 2019/3/27 8:49
 */
public class DengLu {
    public static void main(String[] args) {
        Scanner in= new Scanner(System.in);
        String  name="admin";
        String  mima="admin";
        int count=2;
        while (true){
        System.out.println("请输入用户名：");
        String str1=in.nextLine();
        System.out.println("请输入密码");
        String str2=in.nextLine();
        if (str1==name && str2==mima){
            System.out.println("登录成功！");

        }else {
            System.out.println("登录失败,你还有"+count+"次机会");
        }
       /** count--;
        if (count<1){
            System.out.println("登录失败，账号已锁定，请联系客服");
        }*/

        }
    }
}
